<!DOCTYPE html>
<html>
<head>
    <!-- The jQuery library is a prerequisite for all jqSuite products -->
    <script type="text/ecmascript" src="../../../js/jquery.min.js"></script> 
    <!-- This is the Javascript file of jqGrid -->   
    <script type="text/ecmascript" src="../../../js/trirand/jquery.jqGrid.min.js"></script>
    <!-- This is the localization file of the grid controlling messages, labels, etc.-->
    <!-- We support more than 40 localizations -->
    <script type="text/ecmascript" src="../../../js/trirand/i18n/grid.locale-en.js"></script>
		<script type="text/javascript">   	  
	$.jgrid.no_legacy_api = true;
	$.jgrid.useJSON = true;
	$.jgrid.defaults.width = "700";
	</script>
    <!-- A link to a jQuery UI ThemeRoller theme, more than 22 built-in and many more custom -->
    <link rel="stylesheet" type="text/css" media="screen" href="../../../css/jquery-ui.css" />
    <!-- The link to the CSS that the grid needs -->
    <link rel="stylesheet" type="text/css" media="screen" href="../../../css/trirand/ui.jqgrid.css" />
    <meta charset="utf-8" />
    <title>jqGrid Loading Data - JSON </title>
</head>
  <body>
    <table id="list"></table>
    <div id="pager"></div>

    <script type="text/javascript"> 
        $(document).ready(function () {
            $("#list").jqGrid({
                url: 'data.json',
                datatype: "json",
                contentType: "application/json; charset-utf-8",
                mtype: 'GET',
                colNames: ['CP', 'CP1', 'Cp2', 'Cp3'],
                colModel: [
                    { name: 'CP', index: 'CP', width: 55 },
                    { name: 'CP1', index: 'CP1', width: 90 },
                    { name: 'CP2', index: 'CP2', width: 100 },
					{ name: 'Cp3', index: 'Cp3', width: 100 }
                ],
                rowNum: 5,
                rowList: [5, 10, 15],
                pager: '#pager',
                sortname: 'CP',
                viewrecords: true,
                sortorder: "asc",
                caption: "JSON Example",
                loadonce: true, 
				autoencode: true
            });
            $("#list").jqGrid('navGrid', '#pager',
                { edit: false, add: false, del: false });        });
 
   </script> 
  </body>
</html>
